<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.*, member.MemberBean,book.RentalBean" %>
<%
	request.setCharacterEncoding("UTF-8");

MemberBean member = (MemberBean)request.getAttribute("member");
	String ruby = (String)request.getAttribute("ruby");
	List<RentalBean> rentals = (List<RentalBean>)request.getAttribute("rentals");
	//String title = (String)request.getAttribute("title");
	//String  isbn = (String)request.getAttribute(" isbn");


 %>
<c:import url="/share/layout.jsp" >
    <c:param name="title" value="書籍返却"/>
    <c:param name="css" value="userbookreturn.css"/>
    <c:param name="content">
        <jsp:attribute name="value">
<!-- contents start -->


<table  class="form_table">
	<tr>
		<th>氏名</th>
		<td><%= member.getName() %></td>
		<th>フリガナ</th>
		<td><%= member.getRuby() %></td>
	</tr>
</table>

	<br/>

	<table class="bookreturn_table">

		<tr>
			<th style="width:80px">貸出日</th>
			<th>タイトル</th>
			<th style="width:120px">ISBNコード</th>
			<th style="width:120px"></th>
		</tr>
		<% for ( int i=0 ; i<rentals.size() ; i++ ) { %>
		<% RentalBean rental = (RentalBean)rentals.get(i); %>
			<tr>
				<td><%= rental.getRentalDate() %></td>
				<td><%= rental.getTitle() %></td>
				<td><%= rental.getIsbn() %></td>
				<td>
				<!-- 	<input class="bookreturn" type="submit" value="返却" />	 -->
				<!-- 遷移先を修正 2013.10.18 若林 -->
				<p  class="bookreturn"><a  href="/Books/book/ReturnServlet?book_id=<%= rental.getBookId() %>&user_id=<%=member.getId() %>&rental_id=<%=rental.getId() %>">返却</a></p>
				</td>
			</tr>
		<% } %>
	</table>

	<div id="btn_area">
		<!-- 遷移先を修正 2013.10.18 若林 -->
		<input class="button" type="button" value="戻る" onClick="location.href='/Books/member/RentalListServlet'" />
	</div>




<!-- contents end -->
        </jsp:attribute>
    </c:param>
</c:import>

